package com.kingmed.kmss.api.config;

import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import com.kingmed.kmss.common.config.BaseSwaggerConfig;
import com.kingmed.kmss.common.domain.SwaggerProperties;

import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * Swagger API文档相关配置(如需集成Knife4j必须引入)
 */
@Configuration
@EnableSwagger2
@EnableKnife4j
public class SwaggerConfig extends BaseSwaggerConfig {

    @Override
    public SwaggerProperties swaggerProperties() {
        return SwaggerProperties.builder()
                .apiBasePackage("com.kingmed.crm")
                .title("kmss-api项目")
                .description("kmss-api项目相关接口文档")
                .contactName("lilin")
                .version("1.0")
                .enableSecurity(true)
                .build();
    }
    @Bean
    public BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() {
        return generateBeanPostProcessor();
    }
}
